package com.example.taskexecutor.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @author ljw
 * @description
 * @date 2021/8/11 7:42
 */
@Service
public class AsyncTaskService {

    @Async
    public void executeAsyncTask(Integer i) {
        System.out.println(Thread.currentThread().getName()+" 在执行异步任务：" + i);
    }

    @Async
    public void executeAsyncTaskPlus(Integer i) {
        System.out.println(Thread.currentThread().getName()+" 在打印任务编号：" + i);
    }
}
